"""

@Time: 2021/1/27 23:27
@Author:
@File: user_mapper.py
"""
from sqlalchemy.orm import Session

from models.po import mysql_po




def get_user(db: Session, username: str) -> mysql_po.User:
    """
    根据username获取该用户
    """
    return db.query(mysql_po.User).filter(mysql_po.User.username == username).first()